﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Speech.Synthesis;
using System.Text;

namespace project1113.TTS
{
    public class TTS
    {
            public void Speak(string s)
            {
                SpeechSynthesizer speech = new SpeechSynthesizer();
                // Changing the Voice and Pronunciation
                PromptBuilder builder = new PromptBuilder();
                // builder.StartVoice(VoiceGender.Male, VoiceAge.Child, 1);
                builder.StartVoice(VoiceGender.Female, VoiceAge.Adult, 0);
                builder.AppendText(s);
                builder.EndVoice();
                speech.Speak(builder);
        }
    }
}